﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master Resources/XLMaster.Master"
    AutoEventWireup="true" CodeBehind="EditAccount.aspx.cs" Inherits="XclusiveClient.EditAccount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <div id="wrapper" style="margin-left:150px">
        <div id="steps">
            <form id="formElem" name="formElem" action="" method="post">
            <fieldset class="step">
                <legend>Account Information</legend>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="username" runat="server" Text="Username"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxusername" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="tbxusername"
                                ForeColor="Red" ErrorMessage="Please enter username" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                ControlToValidate="tbxusername" ErrorMessage="Invalid username, must be 6-14 alphanumeric and no spaces, special characters allowed"
                                ValidationExpression="^([a-zA-Z0-9]{6,14})$" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="password" runat="server" Text="Password"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxpassword" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="tbxpassword"
                                ErrorMessage="Please enter password" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                ControlToValidate="tbxpassword" ErrorMessage="Invalid password, must contain at least a number"
                                ValidationExpression="(^([\d][\w]*)$)|(^([\w]*[\d][\w]*)$)|(^([\w]*[\d])$)" ForeColor="Red"
                                Display="Dynamic"></asp:RegularExpressionValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator4" ControlToValidate="tbxpassword"
                                runat="server" ErrorMessage="Invalid password, must be at least 7 alphanumeric long and no spaces, special characters allowed"
                                ValidationExpression="^[a-zA-Z0-9]{7,99}$" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="password_confirm" runat="server" Text="Confirm Password"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxpassword_confirm" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="tbxpassword_confirm"
                                ErrorMessage="Please enter password" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Different password type in, Please retype"
                                ControlToCompare="tbxpassword" ControlToValidate="tbxpassword_confirm" ForeColor="Red"
                                Display="Dynamic"></asp:CompareValidator>
                        </tr>
                    </table>
                </p>
            </fieldset>
            <fieldset class="step">
                <legend>Personal Details</legend>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="full_name" runat="server" Text="Full Name"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxfull_name" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="tbxfull_name"
                                ForeColor="Red" ErrorMessage="Please enter full name" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server"
                                ControlToValidate="tbxfull_name" ErrorMessage="Invalid full name, only allows spaces and letters"
                                ForeColor="Red" ValidationExpression="^((\s|[a-zA-Z])+)$" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="email" runat="server" Text="Email"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxemail" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="tbxemail"
                                ForeColor="Red" ErrorMessage="Please enter email address" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server"
                                ErrorMessage="Invalid email address" ControlToValidate="tbxemail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="contact_number" runat="server" Text="Contact Number"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxcontact_number" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" ControlToValidate="tbxcontact_number"
                                runat="server" ForeColor="Red" ErrorMessage="Please enter contact number"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator11" ControlToValidate="tbxcontact_number"
                                runat="server" ErrorMessage="Invalid contact number, must be exactly 8 numbers long"
                                ForeColor="Red" ValidationExpression="^([0-9]{8})$" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="address" runat="server" Text="Address"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxaddress" runat="server" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator12" ControlToValidate="tbxaddress"
                            runat="server" ForeColor="Red" ErrorMessage="Please enter address" Display="Dynamic"></asp:RequiredFieldValidator>
                    </table>
                </p>
            </fieldset>
            <fieldset class="step">
                <legend>Company's Details</legend>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="company_name" runat="server" Text="Company Name"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxcompany_name" runat="server" ReadOnly="true"></asp:TextBox>
                            </td>
                        </tr>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator13" ControlToValidate="tbxaddress"
                            runat="server" ForeColor="Red" ErrorMessage="Please enter company name" Display="Dynamic"></asp:RequiredFieldValidator>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="company_email" runat="server" Text="Company's Email"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxcompany_email" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="tbxcompany_email"
                                ForeColor="Red" ErrorMessage="Please enter company's email address" Display="Dynamic"></asp:RequiredFieldValidator>
                            &nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator15" runat="server"
                                ErrorMessage="Invalid email address" ControlToValidate="tbxcompany_email" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="company_country" runat="server" Text="Company's Country"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddcompany_country" runat="server">
                                    <asp:ListItem Selected="True">SGD</asp:ListItem>
                                    <asp:ListItem>USD</asp:ListItem>
                                    <asp:ListItem>TWN</asp:ListItem>
                                    <asp:ListItem>AED</asp:ListItem>
                                    <asp:ListItem>AFD</asp:ListItem>
                                    <asp:ListItem>ALL</asp:ListItem>
                                    <asp:ListItem>AMD</asp:ListItem>
                                    <asp:ListItem>ANG</asp:ListItem>
                                    <asp:ListItem>AOA</asp:ListItem>
                                    <asp:ListItem>ARS</asp:ListItem>
                                    <asp:ListItem>AUD</asp:ListItem>
                                    <asp:ListItem>AWG</asp:ListItem>
                                    <asp:ListItem>AZN</asp:ListItem>
                                    <asp:ListItem>BAM</asp:ListItem>
                                    <asp:ListItem>BBD</asp:ListItem>
                                    <asp:ListItem>BDT</asp:ListItem>
                                    <asp:ListItem>BGN</asp:ListItem>
                                    <asp:ListItem>BHD</asp:ListItem>
                                    <asp:ListItem>BIF</asp:ListItem>
                                    <asp:ListItem>BMD</asp:ListItem>
                                    <asp:ListItem>BND</asp:ListItem>
                                    <asp:ListItem>BOB</asp:ListItem>
                                    <asp:ListItem>BRL</asp:ListItem>
                                    <asp:ListItem>BSD</asp:ListItem>
                                    <asp:ListItem>BTN</asp:ListItem>
                                    <asp:ListItem>BWP</asp:ListItem>
                                    <asp:ListItem>BYR</asp:ListItem>
                                    <asp:ListItem>BZD</asp:ListItem>
                                    <asp:ListItem>CAD</asp:ListItem>
                                    <asp:ListItem>CDF</asp:ListItem>
                                    <asp:ListItem>CHF</asp:ListItem>
                                    <asp:ListItem>CLF</asp:ListItem>
                                    <asp:ListItem>CLP</asp:ListItem>
                                    <asp:ListItem>CNY</asp:ListItem>
                                    <asp:ListItem>COP</asp:ListItem>
                                    <asp:ListItem>CRC</asp:ListItem>
                                    <asp:ListItem>CUP</asp:ListItem>
                                    <asp:ListItem>CVE</asp:ListItem>
                                    <asp:ListItem>CZK</asp:ListItem>
                                    <asp:ListItem>DJF</asp:ListItem>
                                    <asp:ListItem>DKK</asp:ListItem>
                                    <asp:ListItem>DOP</asp:ListItem>
                                    <asp:ListItem>DZD</asp:ListItem>
                                    <asp:ListItem>EEK</asp:ListItem>
                                    <asp:ListItem>EGP</asp:ListItem>
                                    <asp:ListItem>ETB</asp:ListItem>
                                    <asp:ListItem>EUR</asp:ListItem>
                                    <asp:ListItem>FJD</asp:ListItem>
                                    <asp:ListItem>FKP</asp:ListItem>
                                    <asp:ListItem>GBP</asp:ListItem>
                                    <asp:ListItem>GEL</asp:ListItem>
                                    <asp:ListItem>GHS</asp:ListItem>
                                    <asp:ListItem>GIP</asp:ListItem>
                                    <asp:ListItem>GMD</asp:ListItem>
                                    <asp:ListItem>GNF</asp:ListItem>
                                    <asp:ListItem>GTQ</asp:ListItem>
                                    <asp:ListItem>GYD</asp:ListItem>
                                    <asp:ListItem>HKD</asp:ListItem>
                                    <asp:ListItem>HNL</asp:ListItem>
                                    <asp:ListItem>HRK</asp:ListItem>
                                    <asp:ListItem>HTG</asp:ListItem>
                                    <asp:ListItem>HUF</asp:ListItem>
                                    <asp:ListItem>IDR</asp:ListItem>
                                    <asp:ListItem>ILS</asp:ListItem>
                                    <asp:ListItem>INR</asp:ListItem>
                                    <asp:ListItem>IQD</asp:ListItem>
                                    <asp:ListItem>IRR</asp:ListItem>
                                    <asp:ListItem>ISK</asp:ListItem>
                                    <asp:ListItem>JEP</asp:ListItem>
                                    <asp:ListItem>JMD</asp:ListItem>
                                    <asp:ListItem>JOD</asp:ListItem>
                                    <asp:ListItem>JPY</asp:ListItem>
                                    <asp:ListItem>KES</asp:ListItem>
                                    <asp:ListItem>KGS</asp:ListItem>
                                    <asp:ListItem>KHR</asp:ListItem>
                                    <asp:ListItem>KMF</asp:ListItem>
                                    <asp:ListItem>KPW</asp:ListItem>
                                    <asp:ListItem>KRW</asp:ListItem>
                                    <asp:ListItem>KWD</asp:ListItem>
                                    <asp:ListItem>KYD</asp:ListItem>
                                    <asp:ListItem>KZT</asp:ListItem>
                                    <asp:ListItem>LAK</asp:ListItem>
                                    <asp:ListItem>LBP</asp:ListItem>
                                    <asp:ListItem>LKR</asp:ListItem>
                                    <asp:ListItem>LRD</asp:ListItem>
                                    <asp:ListItem>LSL</asp:ListItem>
                                    <asp:ListItem>LTL</asp:ListItem>
                                    <asp:ListItem>LVL</asp:ListItem>
                                    <asp:ListItem>LYD</asp:ListItem>
                                    <asp:ListItem>MAD</asp:ListItem>
                                    <asp:ListItem>MDL</asp:ListItem>
                                    <asp:ListItem>MGA</asp:ListItem>
                                    <asp:ListItem>MKD</asp:ListItem>
                                    <asp:ListItem>MMK</asp:ListItem>
                                    <asp:ListItem>MNT</asp:ListItem>
                                    <asp:ListItem>MOP</asp:ListItem>
                                    <asp:ListItem>MRO</asp:ListItem>
                                    <asp:ListItem>MUR</asp:ListItem>
                                    <asp:ListItem>MVR</asp:ListItem>
                                    <asp:ListItem>MWK</asp:ListItem>
                                    <asp:ListItem>MXN</asp:ListItem>
                                    <asp:ListItem>MYR</asp:ListItem>
                                    <asp:ListItem>MZN</asp:ListItem>
                                    <asp:ListItem>NAD</asp:ListItem>
                                    <asp:ListItem>NGN</asp:ListItem>
                                    <asp:ListItem>NIO</asp:ListItem>
                                    <asp:ListItem>NOK</asp:ListItem>
                                    <asp:ListItem>NPR</asp:ListItem>
                                    <asp:ListItem>NZD</asp:ListItem>
                                    <asp:ListItem>OMR</asp:ListItem>
                                    <asp:ListItem>PAB</asp:ListItem>
                                    <asp:ListItem>PEN</asp:ListItem>
                                    <asp:ListItem>PGK</asp:ListItem>
                                    <asp:ListItem>PHP</asp:ListItem>
                                    <asp:ListItem>PKR</asp:ListItem>
                                    <asp:ListItem>PLN</asp:ListItem>
                                    <asp:ListItem>PYG</asp:ListItem>
                                    <asp:ListItem>QAR</asp:ListItem>
                                    <asp:ListItem>RON</asp:ListItem>
                                    <asp:ListItem>RSD</asp:ListItem>
                                    <asp:ListItem>RUB</asp:ListItem>
                                    <asp:ListItem>RWF</asp:ListItem>
                                    <asp:ListItem>SAR</asp:ListItem>
                                    <asp:ListItem>SBD</asp:ListItem>
                                    <asp:ListItem>SCR</asp:ListItem>
                                    <asp:ListItem>SDG</asp:ListItem>
                                    <asp:ListItem>SEK</asp:ListItem>
                                    <asp:ListItem>SHP</asp:ListItem>
                                    <asp:ListItem>SLL</asp:ListItem>
                                    <asp:ListItem>SOS</asp:ListItem>
                                    <asp:ListItem>SRD</asp:ListItem>
                                    <asp:ListItem>STD</asp:ListItem>
                                    <asp:ListItem>SVC</asp:ListItem>
                                    <asp:ListItem>SYP</asp:ListItem>
                                    <asp:ListItem>SZL</asp:ListItem>
                                    <asp:ListItem>THB</asp:ListItem>
                                    <asp:ListItem>TJS</asp:ListItem>
                                    <asp:ListItem>TMT</asp:ListItem>
                                    <asp:ListItem>TND</asp:ListItem>
                                    <asp:ListItem>TOP</asp:ListItem>
                                    <asp:ListItem>TRY</asp:ListItem>
                                    <asp:ListItem>TTD</asp:ListItem>
                                    <asp:ListItem>TZS</asp:ListItem>
                                    <asp:ListItem>UAH</asp:ListItem>
                                    <asp:ListItem>UGX</asp:ListItem>
                                    <asp:ListItem>UYU</asp:ListItem>
                                    <asp:ListItem>UZS</asp:ListItem>
                                    <asp:ListItem>VEF</asp:ListItem>
                                    <asp:ListItem>VND</asp:ListItem>
                                    <asp:ListItem>VUV</asp:ListItem>
                                    <asp:ListItem>WST</asp:ListItem>
                                    <asp:ListItem>XAF</asp:ListItem>
                                    <asp:ListItem>XCD</asp:ListItem>
                                    <asp:ListItem>XDR</asp:ListItem>
                                    <asp:ListItem>XOF</asp:ListItem>
                                    <asp:ListItem>XPF</asp:ListItem>
                                    <asp:ListItem>YER</asp:ListItem>
                                    <asp:ListItem>ZAR</asp:ListItem>
                                    <asp:ListItem>ZMK</asp:ListItem>
                                    <asp:ListItem>ZWL</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td td width="150px">
                            </td>
                            <td>
                                <asp:Button ID="btnCheck" runat="server" Text="Check" OnClick="btnCheck_Click" 
                                    UseSubmitBehavior="False"></asp:Button>
                            </td>
                            <td>
                                <asp:Label ID="lblrates" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </p>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                <asp:Label ID="company_address" runat="server" Text="Company's Address"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="tbxcompany_address" runat="server" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxcompany_address"
                            ForeColor="Red" ErrorMessage="Please enter company's address" Display="Dynamic"></asp:RequiredFieldValidator>
                    </table>
                </p>
            </fieldset>
            <fieldset class="step">
                <legend>Confirm</legend>
                <p>
                    <table style="margin-left: 125px">
                        <tr>
                            <td width="150px">
                                Please check through before you update...
                                <br />Sorry, you are not allowed to update your company name...
                            </td>
                        </tr>
                    </table>
                </p>
                <p class="submit">
                    <table style="margin-left: 100px">
                        <tr>
                            <td width="125px">
                            </td>
                            <td>
                                <asp:Button ID="updateButton" runat="server" Text="Update" OnClick="updateButton_Click">
                                </asp:Button>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblStatus" runat="server" Visible="false"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </p>
            </fieldset>
            </form>
        </div>
        <div id="navigation" style="display: none;">
            <ul>
                <li class="selected"><a href="#">Account Information</a> </li>
                <li><a href="#">Personal Details</a> </li>
                <li><a href="#">Company Details</a> </li>
                <li><a href="#">Confirm</a> </li>
            </ul>
        </div>
    </div>
    </div> </div>
</asp:Content>
